Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GLUTEN-7953][VL] Fetch and dump all inputs for micro benchmark on middle stage begin #7998

Merged
merged 5 commits into from
Nov 25, 2024

Conversation

marin-ma
Copy link
Contributor

@marin-ma marin-ma commented Nov 20, 2024

Collect all input data and save it into a Parquet file. Then, read the data from the Parquet file to feed it into the pipeline.

Update spark.gluten.sql.benchmark_task.partitionId and spark.gluten.sql.benchmark_task.taskId to accept a comma-separated string of multiple partition ids/task ids

Currently, the input files are being dumped during the middle stage of execution. This PR will fetch all the data and save it into file before the pipeline starts. The stage input will then be read from this dumped file. This will help to save a complete input file even if the task fails. In this way, we can have the full input data of the failed task, and reproduce the failure with microbenchmark.

@github-actions github-actions bot added the VELOX label Nov 20, 2024
Copy link

#7953

@Yohahaha
Copy link
Contributor

does this PR only works for middle stage? or dump the data comes from shuffle?

@marin-ma marin-ma changed the title [GLUTEN-7953] Fetch and dump all inputs for micro benchmark on stage begin [GLUTEN-7953] Fetch and dump all inputs for micro benchmark on middle stage begin Nov 20, 2024
@marin-ma
Copy link
Contributor Author

@Yohahaha Yes. It only works for middle stage. Updated PR titile.

@zhztheplayer
Copy link
Member

zhztheplayer commented Nov 20, 2024

@marin-ma Curious what're the improvements here, comparing to #725? Thanks.

@zhztheplayer zhztheplayer changed the title [GLUTEN-7953] Fetch and dump all inputs for micro benchmark on middle stage begin [GLUTEN-7953][VL] Fetch and dump all inputs for micro benchmark on middle stage begin Nov 20, 2024
@marin-ma
Copy link
Contributor Author

@marin-ma Curious what're the improvements here, comparing to #725? Thanks.

@zhztheplayer Currently, the input files are being dumped during the middle stage of execution. This PR will fetch all the data and save it into file before the pipeline starts. The stage input will then be read from this dumped file. This will help to save a complete input file even if the task fails. In this way, we can have the full input data of the failed task, and reproduce the failure with microbenchmark.

auto rb = gluten::arrowGetOrThrow(arrow::ImportRecordBatch(array.get(), schema.get()));
GLUTEN_THROW_NOT_OK(writer_->initWriter(*(rb->schema().get())));
GLUTEN_THROW_NOT_OK(writer_->writeInBatches(rb));
} while (env->CallBooleanMethod(jColumnarBatchItr_, serializedColumnarBatchIteratorHasNext_));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checkEnv after CallBooleanMethod

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We get all the batch, so the batch Iterator cannot be reused, will it affect the following stage

Copy link
Contributor Author

@marin-ma marin-ma Nov 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jinchengchenghh In what cases would the batch iterator be reused? Could you elaborate more on this? Thanks!

}
return reader_->next();
}
} // namespace gluten
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

end empty line

@github-actions github-actions bot added CORE works for Gluten Core DOCS labels Nov 20, 2024
Copy link

Run Gluten Clickhouse CI on x86

@github-actions github-actions bot added the INFRA label Nov 21, 2024
Copy link

Run Gluten Clickhouse CI on x86

Copy link
Contributor

@FelixYBW FelixYBW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works. Thank you Rong.

@marin-ma marin-ma merged commit 58e7d83 into apache:main Nov 25, 2024
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CORE works for Gluten Core DOCS INFRA VELOX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants